import request from '@/utils/request'

// 查询清单分类列表
export function listType(query) {
  return request({
    url: '/list/type/list',
    method: 'get',
    params: query
  })
}
// 查询施工规范分类
export function listTypeData(query) {
  return request({
    url: '/quality/specifications/list',
    method: 'get',
    params: query
  })
}

// 新增节点
export function addNode(query) {
  return request({
    url: '/quality/specifications',
    method: 'POST',
    data: query
  })
}

// 查看节点
export function lookNode(id) {
  return request({
    url: '/quality/specifications/'+id,
    method: 'get',
  })
}

//修改节点信息
export function updateNode(data) {
  return request({
    url: '/quality/specifications',
    method: 'put',
    data: data
  })
}

// 删除清单分类
export function delNode(id) {
  return request({
    url: '/quality/specifications/' + id,
    method: 'delete'
  })
}

// 查询清单分类详细
export function getType(id) {
  return request({
    url: '/list/type/' + id,
    method: 'get'
  })
}



// 新增清单分类
export function addType(data) {
  return request({
    url: '/list/type',
    method: 'post',
    data: data
  })
}

// 修改清单分类
export function updateType(data) {
  return request({
    url: '/list/type',
    method: 'put',
    data: data
  })
}

// 删除清单分类
export function delType(id) {
  return request({
    url: '/list/type/' + id,
    method: 'delete'
  })
}

// 清单分类下拉树
export function treeselect(data){
  return request({
    url: '/list/type/treeselect',
    method: 'post',
    data: data
  })
}
